﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ControlTemplate x:Key="PhoneProgressBarSliderThumb" TargetType="Thumb">
        <Rectangle IsHitTestVisible="False" Width="3" Height="3" Fill="{TemplateBinding Foreground}"/>
    </ControlTemplate>
    <Style x:Key="PhoneProgressBarSliderStyle" TargetType="{x:Type Slider}">
        <Setter Property="Maximum" Value="3000"/>
        <Setter Property="Minimum" Value="0"/>
        <Setter Property="Opacity" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Grid x:Name="GridRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <!-- The Track lays out the repeat buttons and thumb -->
                        <Track Grid.Row="1" x:Name="PART_Track">
                            <Track.Thumb>
                                <Thumb Template="{StaticResource PhoneProgressBarSliderThumb}" Foreground="{TemplateBinding Foreground}"/>
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Command="Slider.IncreaseLarge" Template="{x:Null}"/>
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Command="Slider.DecreaseLarge" Template="{x:Null}"/>
                            </Track.DecreaseRepeatButton>
                        </Track>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MetroProgressBarStyle" TargetType="{x:Type ProgressBar}">
        <Setter Property="Foreground" Value="#FF1BA1E2"/>
        <Setter Property="Background" Value="#FF1BA1E2"/>
        <Setter Property="IsHitTestVisible" Value="False"/>
        <Setter Property="Padding" Value="12"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Determinate"/>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard RepeatBehavior="Forever" Duration="00:00:04.4">
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeterminateRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider1" Storyboard.TargetProperty="Value">
                                            <EasingDoubleKeyFrame Value="1000" 	KeyTime="00:00:00.5">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                            <LinearDoubleKeyFrame Value="2000" 	KeyTime="00:00:02.0" />
                                            <EasingDoubleKeyFrame Value="3000" 	KeyTime="00:00:02.5" >
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider2" Storyboard.TargetProperty="Value" BeginTime="00:00:00.2">
                                            <EasingDoubleKeyFrame Value="1000" 	KeyTime="00:00:00.5">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                            <LinearDoubleKeyFrame Value="2000" 	KeyTime="00:00:02.0" />
                                            <EasingDoubleKeyFrame Value="3000" 	KeyTime="00:00:02.5" >
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider3" Storyboard.TargetProperty="Value" BeginTime="00:00:00.4">
                                            <EasingDoubleKeyFrame Value="1000" 	KeyTime="00:00:00.5">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                            <LinearDoubleKeyFrame Value="2000" 	KeyTime="00:00:02.0" />
                                            <EasingDoubleKeyFrame Value="3000" 	KeyTime="00:00:02.5" >
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider4" Storyboard.TargetProperty="Value" BeginTime="00:00:00.6">
                                            <EasingDoubleKeyFrame Value="1000" 	KeyTime="00:00:00.5">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                            <LinearDoubleKeyFrame Value="2000" 	KeyTime="00:00:02.0" />
                                            <EasingDoubleKeyFrame Value="3000" 	KeyTime="00:00:02.5" >
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider5" Storyboard.TargetProperty="Value" BeginTime="00:00:00.8">
                                            <EasingDoubleKeyFrame Value="1000" 	KeyTime="00:00:00.5">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                            <LinearDoubleKeyFrame Value="2000" 	KeyTime="00:00:02.0" />
                                            <EasingDoubleKeyFrame Value="3000" 	KeyTime="00:00:02.5" >
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" Exponent="1"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider1" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame Value="1"	KeyTime="0" />
                                            <DiscreteDoubleKeyFrame Value="0"	KeyTime="00:00:02.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider2" Storyboard.TargetProperty="Opacity" BeginTime="00:00:00.2">
                                            <DiscreteDoubleKeyFrame Value="1"	KeyTime="0" />
                                            <DiscreteDoubleKeyFrame Value="0"	KeyTime="00:00:02.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider3" Storyboard.TargetProperty="Opacity" BeginTime="00:00:00.4">
                                            <DiscreteDoubleKeyFrame Value="1"	KeyTime="0" />
                                            <DiscreteDoubleKeyFrame Value="0"	KeyTime="00:00:02.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider4" Storyboard.TargetProperty="Opacity" BeginTime="00:00:00.6">
                                            <DiscreteDoubleKeyFrame Value="1"	KeyTime="0" />
                                            <DiscreteDoubleKeyFrame Value="0"	KeyTime="00:00:02.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Slider5" Storyboard.TargetProperty="Opacity" BeginTime="00:00:00.8">
                                            <DiscreteDoubleKeyFrame Value="1"	KeyTime="0" />
                                            <DiscreteDoubleKeyFrame Value="0"	KeyTime="00:00:02.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="DeterminateRoot" Visibility="Visible" Margin="{TemplateBinding Padding}">
                            <Rectangle x:Name="PART_Track" Opacity="0.1" Height="4" />
                            <Rectangle x:Name="PART_Indicator" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left"  Height="4" />
                        </Grid>
                        <Border x:Name="IndeterminateRoot" Visibility="Collapsed" Margin="{TemplateBinding Padding}">
                            <Grid>
                                <Slider x:Name="Slider1" Style="{StaticResource PhoneProgressBarSliderStyle}" Foreground="{TemplateBinding Foreground}"/>
                                <Slider x:Name="Slider2" Style="{StaticResource PhoneProgressBarSliderStyle}" Foreground="{TemplateBinding Foreground}"/>
                                <Slider x:Name="Slider3" Style="{StaticResource PhoneProgressBarSliderStyle}" Foreground="{TemplateBinding Foreground}"/>
                                <Slider x:Name="Slider4" Style="{StaticResource PhoneProgressBarSliderStyle}" Foreground="{TemplateBinding Foreground}"/>
                                <Slider x:Name="Slider5" Style="{StaticResource PhoneProgressBarSliderStyle}" Foreground="{TemplateBinding Foreground}"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>